<?php

class site{
        var $url;
        var $title;
        var $description;
        var $keywords;
        var $author;
        function __construct($url,$title,$description,$keywords,$author){
                $this->url = $url;
                $this->title = $title;
                $this->description = $description;
                $this->keywords = $keywords;
                $this->author = $author;
        }
        function __destruct(){
                print "site object is destroyed";
        }
        function display(){
                echo "URL: ".$this->url."<br>\n";
                echo "Title: ".$this->title."<br>\n";
                echo "Description: ".$this->description."<br>\n";
                echo "Keywords: ".$this->keywords."<br>\n";
                echo "Author: ".$this->author."<br>\n";
                echo "<br>".$this->url."<br>\n";
        }       
        function setUrl($url){
                $this->url = $url;
        }
        function setTitle($title){
                $this->title = $title;
        }
        function setDescription($description){
                $this->description = $description;
        }
        function setKeywords($keywords){
                $this->keywords = $keywords;
        }
        function setAuthor($author){
                $this->author = $author;
        }
        function getUrl(){
                return $this->url;
        }
        function getTitle(){
                return $this->title;
        }
        function getDescription(){
                return $this->description;
        }
        function getKeywords(){
                return $this->keywords;
        }
        function getAuthor(){
                return $this->author;
        }
}

$runoob = new site("http://www.runoob.com","菜鸟教程","菜鸟教程是一个提供各类编程语言学习的网站","教程,编程,学习,php,mysql","Runoob.com");
$runoob->display();
$runoob->setUrl("http://www.runoob.com/php/php-tutorial.html");
$runoob->setTitle("PHP 教程");
$runoob->setDescription("菜鸟教程提供各类 PHP 学习教程，涵盖 PHP 基础知识、PHP 高级技术、PHP 框架、PHP 扩展、PHP 开发工具、PHP 面试题等内容。");
$runoob->setKeywords("PHP教程,PHP基础教程,PHP高级教程,PHP框架教程,PHP扩展教程,PHP开发工具教程,PHP面试题");

echo $runoob->getUrl().PHP_EOL;



?>